package com.wlhse.dao;

import com.wlhse.dto.*;
import com.wlhse.dto.inDto.HseAuditGroupMemberDtos;
import com.wlhse.dto.inDto.QHSEECheckRecords;
import com.wlhse.dto.inDto.QHseeCheckRecordDto;
import com.wlhse.dto.outDto.QhseeSystemDto;
import com.wlhse.entity.EventRecordPojo;
import com.wlhse.entity.HseAuditTaskPojo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.HashSet;
import java.util.List;

public interface HSEDao {
    int addHSEAuditGroup(HSEAuditGroupDto hseAuditGroupDto);
    List<String> queryHseAuditTaskByYearRound(HSEAuditGroupDto hseAuditGroupDto);
    List<HSEAuditGroupDto> queryHSEAuditGroup(HSEAuditGroupDto hseAuditGroupDto);
    int deleteHSEAuditGroup(@Param("id")Integer id);
    int deleteHSEAuditGroupMember(@Param("id")Integer id);
    int addHseAuditGroupMember(HseAuditGroupMemberDto hseAuditGroupMemberDto);
    int addHseAuditGroupMembers(HseAuditGroupMemberDtos hseAuditGroupMemberDto);
    int dropHseAuditGroupMember(@Param("groupID") Integer groupID);
    int updateHseAuditGroupArea(@Param("companyCodes") String companyCodes,@Param("companyNames") String companyNames,
                                @Param("auditGroupID") String auditGroupID);
    int updateHseAuditGroupAreas(@Param("companyCodes") String companyCodes,@Param("companyNames") String companyNames,
                                @Param("auditGroupID") Integer auditGroupID);
    List<HseAuditGroupMemberDto> queryAllGroupMembersByYearRound(HSEAuditGroupDto hseAuditGroupDto);
    int updateHseAuditGroupMembersTopics(HseAuditGroupMemberDto hseAuditGroupMemberDto);

    int addHseAuditTask(HseAuditTaskPojo hseAuditTaskPojo);

    List<HseAuditTaskPojo> queryHseAuditTask1(HseAuditTaskPojo hseAuditTaskPojo);
    List<HseAuditTaskPojo> queryHseAuditTask2(HseAuditTaskPojo hseAuditTaskPojo);
    List<HseAuditTaskPojo> queryHseAuditTask3(HseAuditTaskPojo hseAuditTaskPojo);
    List<HseAuditTaskPojo> queryHseAuditTask4(HseAuditTaskPojo hseAuditTaskPojo);

    int finishHseAuditTask(Integer auditTaskID);

    int updateHseAuditTask(HseAuditTaskPojo hseAuditTaskPojo);

    int deleteHseAuditTask(Integer auditTaskID);

    int deleteHSEAuditGroupByTaskID(Integer auditTaskID);

    int deleteMemberByGroupID(Integer auditGroupID);

    List<Integer> getGroupIDByTaskID(Integer auditTaskID);

    HseAuditTaskPojo queryHseAuditTaskByID(Integer auditTaskID);

    List<HseAuditSystem> queryHseAuditTopic(HseAuditSystem hseAuditSystem);

    List<HseAuditSystem> queryHseAuditSystemCheckItems(@Param("code") String code);

    List<HseAuditSystem> queryHseAuditSystemByCode(@Param("code") String code);
    QhseeSystemDto queryQhseeSystemDto(@Param("code") String code);
    List<HseTaskAndGroupDto> queryTaskAndGroupByStaffID(@Param("staffID") String staffID,@Param("round") String round,@Param("taskDate") String taskDate);
    List<QHSEECheckRecord> queryAuditSubjectRecord(QHSEECheckRecord qhseeCheckRecord);
    List<QHSEECheckRecord> queryAuditSubjectRecordByStatus(HseCheckRecordDto hseCheckRecordDto);

    HseTaskAndGroupDto queryGroupLeader(@Param("id") String id);

    int addCheckRecord(QHSEECheckRecord qhseeCheckRecord);
    int updateCheckRecord(QHSEECheckRecords qhseeCheckRecord);
    int updateCheckRecordStatus(String id);
    int deleteCheckRecord(@Param("id")String id);

    List<QHSEECheckRecords> queryQhseeCheckRecord(QHSEECheckRecords qhseeCheckRecord);

    int updateQhseeCheckRecordStatus(@Param("status") String status,@Param("id") String id);

    List<String> getAuditGroupIDByUserID(Integer userID);

    HseAuditTaskPojo queryHseAuditTaskByTasknameRoundTaskdate(HseAuditTaskPojo hseAuditTaskPojo);

    int deleteQHSEECheckRecord(@Param("list") List<String> QHSEECheckRecordIDList);
    HashSet<String> queryChidrenNode(QHseeCheckRecordDto qhseeCheckRecord);
    HashSet<String> queryParentNode(String str);
    String querySubject(String str);

    Integer queryNums(@Param("str") String str,@Param("qhseeCheckRecord")QHseeCheckRecordDto qhseeCheckRecord);
    Integer queryNum(@Param("str") String str,@Param("qhseeCheckRecord")QHseeCheckRecordDto qhseeCheckRecord);
    Integer queryCompanyNum(@Param("str") String str,@Param("qhseeCheckRecord") QHseeCheckRecordDto qhseeCheckRecord);

    int delectRectRecordByCheckRecordID(@Param("list") List<String> QHSEECheckRecordIDList);
}
